//
//  SonTableViewCell1.m
//  QuickCure
//
//  Created by 雪中狼 on 9/13/16.
//  Copyright © 2016 haoge. All rights reserved.
//

#import "SonTableViewCell1.h"

@interface SonTableViewCell1()
@property(nonatomic,strong)UIImageView *rightImage;




@end

@implementation SonTableViewCell1

-(UILabel *)leftLabel{
    if (nil == _leftLabel) {
        _leftLabel = [[UILabel alloc]init];
        
    }
    return _leftLabel;
}
-(UILabel *)rightLabel{
    if (nil == _rightLabel) {
        _rightLabel = [[UILabel alloc]init];
        _rightLabel.text =@"请选择";
        _rightLabel.textColor =[UIColor lightGrayColor];
    }
    return _rightLabel;
}
-(UIImageView *)rightImage{
    if (nil == _rightImage) {
        _rightImage = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"gengduo"]];;
        
    }
    return _rightImage;
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self steupUI];
    }

    return self;

}
-(void)steupUI{
    
    [self.contentView addSubview:self.rightImage];
    [self.contentView addSubview:self.leftLabel];
    [self.contentView addSubview:self.rightLabel];
 
 [self.leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
     make.top.leading.equalTo(self.contentView).offset(20);
     make.bottom.equalTo(self.contentView).offset(-20);
 }];
    [self.rightImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.trailing.equalTo(self.contentView).offset(-20);
        make.top.equalTo(self.contentView).offset(20);
        make.bottom.equalTo(self.contentView).offset(-20);
 
    }];
    
    [self.rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(20);
        make.trailing.equalTo(self.rightImage.leading).offset(-15);
        make.bottom.equalTo(self.contentView).offset(-20);

    }];
    
    


    
}

@end
